﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using BALayer;

namespace QuanLyDoan
{
    public partial class FrmLienHe : Form
    {
        DBDoanVien db;

        public FrmLienHe()
        {
            InitializeComponent();
            db = new DBDoanVien();
        }

        private void FrmLienHe_Load(object sender, EventArgs e)
        {
            DataTable dtCanBo = new DataTable();
            dtCanBo.Clear();
            dtCanBo = db.LayChucVu().Tables[0];

            MaCV.DataSource = dtCanBo;
            MaCV.ValueMember = "MaCV";
            MaCV.DisplayMember = "TenCV";

            DataTable dt = new DataTable();
            dt.Clear();
            dt = db.LayCanBoLienHe().Tables[0];

            dgvLienHe.DataSource = dt;
        }

        private void btnTroVe_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
